package it.polimi.swKnights.SWIMv2.ejb.friendsEngine;

import java.util.List;

import it.polimi.swKnights.SWIMv2.ejb.exceptions.AlreadyAskedException;
import it.polimi.swKnights.SWIMv2.ejb.exceptions.AlreadyFriendsException;
import it.polimi.swKnights.SWIMv2.ejb.exceptions.InvalidLoginPrivilegesException;
import it.polimi.swKnights.SWIMv2.ejb.exceptions.LoginFailException;
import it.polimi.swKnights.SWIMv2.ejb.exceptions.SelfFriendException;

import javax.ejb.Remote;
import javax.persistence.EntityNotFoundException;

@Remote
public interface FriendshipRequestManagerRemote
{
	void askFriendship(String newFriend, boolean direct, String userName,
			String password) throws LoginFailException,
			InvalidLoginPrivilegesException, SelfFriendException,
			AlreadyAskedException, AlreadyFriendsException;

	List<String> getFriendshipRequests(String userName, String password)
			throws LoginFailException, InvalidLoginPrivilegesException;

	void acceptRequest(String applicant, String userName, String password)
			throws EntityNotFoundException, LoginFailException,
			InvalidLoginPrivilegesException;

	void refuseRequest(String applicant, String userName, String password)
			throws LoginFailException, InvalidLoginPrivilegesException;

}
